Enigma I, M3 and the four-rotor naval M4, with the historical rotor wirings, ring settings, plugboard and the double step. Type on your keyboard or click the keys. Backspace undoes a key.
Each key closes a circuit through the plugboard, right to left through the rotors, into the reflector and back out by a different route. The diagram shows the stator frame: a row is a fixed contact position, whatever the rotors' rotation.
Because the reflector swaps letters in pairs and fixes none, pressing the lit letter at the same position lights the original key, and no letter can ever light itself. Bletchley's bombes used that second fact to rule out crib positions.
Before May 1940 operators enciphered the message key twice at the start position, so letters 1 and 4, 2 and 5, 3 and 6 hid the same plaintext. Call the permutations at those six positions A to F. Each is an involution, so the products AD, BE and CF have their cycles in equal-length pairs. The plugboard only conjugates them, so the cycle lengths depend on the rotors alone. Rejewski's team catalogued them for all 105,456 rotor orders and positions. Below are the products for six keys from the current start position.
The permutation the next key press will apply: 13 swaps, no fixed letter.
A rotor is a fixed wiring W of the 26 contacts. Turned to offset k (window letter minus ring setting), it acts as ρ−kWρk, where ρ shifts the alphabet by one. With plugboard P, rotors R, M, L (right to left) and reflector U, one key press applies
E = P⁻¹R⁻¹M⁻¹L⁻¹ U L M R P
composed right to left, so P acts first. U is a fixed-point-free involution, so E is too. On the M4 the thin reflector and the fourth rotor (Beta or Gamma) take the place of U. That fourth rotor never steps. With Beta at A, ring A and the thin B reflector, the M4 gives the same output as the M3 with reflector B. That let U-boats talk to three-rotor stations.
The key moves the rotors before the current flows. The right rotor always steps. The middle rotor steps when the right rotor's window shows its turnover letter. The left rotor steps when the middle one shows its own. Because the pawl that turns the left rotor also pushes the middle one, the middle rotor steps twice on consecutive keys. This is the double step: ADU, ADV, AEW, BFX with rotors I, II, III.
Turnover letters: I Q, II E, III V, IV J, V Z, and VI, VII and VIII at both Z and M. The Ringstellung moves the wiring relative to the letter ring and its notch, not the notch relative to the letters.
Wirings follow the Crypto Museum's Enigma wiring tables. The July 1941 preset is a German Army message from the invasion of the Soviet Union, deciphered with its published settings and message key BLA.